<template>
  <common-wrap id="time" title="时间" @toggle="toggle">
    <el-row v-if="detail">
      <el-col :span="8" class="detail-info-item">
        <div class="detail-info__label">计划时间</div>
        <div class="detail-info__content">{{ detail.planTime }}&nbsp;(±{{ detail.winPhase }})</div>
      </el-col>
      <el-col :span="8" class="detail-info-item">
        <div class="detail-info__label">访视时间</div>
        <div class="detail-info__content">
          {{ detail.visitTime }}<span v-if="detail.scanDate" class="super-tag">超窗</span>
        </div>
      </el-col>
      <!-- <el-col :span="8" class="detail-info-item">
        <div class="detail-info__label">建议</div>
        <div class="detail-info__content">{{ detail.suggestDate }}&nbsp;(±{{ detail.suggestScope }})</div>
      </el-col> -->
    </el-row>
  </common-wrap>
</template>

<script lang="ts" setup>
import { defineEmits, defineProps } from 'vue'

import CommonWrap from '@/components/CommonWrap/index.vue'

defineProps({
  detail: {
    type: Object,
    default: () => {},
  },
})
const emits = defineEmits(['toggle'])
const toggle = (show: boolean) => {
  emits('toggle', show)
}
</script>
